<tagLib name="html" />
<include file="Public:header" />

<div class="container" id="cpcontainer">
    <div class="itemtitle">
        <h3>{$Think.lang.manage_users}</h3>
        <ul class="tab1">
            <li><a href="__URL__/userList"><span>{$Think.lang.manage_users}</span></a></li>
            <li><a href="__URL__/addUser"><span>{$Think.lang.add_user}</span></a></li>
            <li class="current"><a href="__URL__/approveUser"><span>{$Think.lang.approve_user}</span></a></li>
            <li><a href="__URL__/searchUser"><span>{$Think.lang.search_user}</span></a></li>
        </ul>
    </div>
    <p>{$Think.lang.approve_user_tips}</p>
    <form name="cpform" method="post" action="__URL__/approveUser" id="cpform">
    <input type="hidden" name="op" value="save" />
    <table class="tb tb2 fixpadding tablesorter" id="myTable">
        <thead>
        <tr>
            <th>{$Think.lang.username}</th>
            <th>{$Think.lang.email}</th>
            <th>{$Think.lang.register_date}</th>
            <th>{$Think.lang.last_activity}</th>
            <th>{$Think.lang.register_ip}</th>
            <th width="10%">{$Think.lang.mark}</th>
        </tr> 
        </thead>
        <tbody>
        <volist name="userList" id="vo">
        <tr>
            <td><a href="{:format_user_url($vo['user_id'],$vo['username'])}" target="_blank">{$vo.username}</a></td>
            <td>{$vo.email}</td>
            <td>{$vo.register_date}</td>
            <td>{$vo.last_activity|format_date}</td>
            <td><a href="#" onclick="ipToCountry('{$vo.register_ip}');" title="{$Think.lang.ip_whois}">{$vo.register_ip}</a></td>
            <td><input type="checkbox" class="checkbox" name="mods[]" value="{$vo.user_id}" /></td>
        </tr>
        </volist>
        </tbody>
        <tr class="nobg">
            <td colspan="5">
                <div class="fixsel right">
                    <input type="submit" class="btn" name="action[approve]" value="{$Think.lang.approve_selected}" />
                    <input type="submit" class="btn" name="action[delete]" value="{$Think.lang.del_selected}" />
                </div>
            </td>
            <td><input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll('prefix', this.form, 'mods')" /><label for="chkall">{$Think.lang.check_all}</label></td>
        </tr>
        <tr class="nobg">
            <td colspan="15"><div class="cuspages right"><div class="pages">{$pagination}</div></div></td>
        </tr>
    </table>
    </form>  
</div>

<script type="text/javascript">
    $(function(){ 
        $("#myTable").tablesorter({
            headers:{
                5:{sorter:false}            
            }        
        }); 
    });
</script>

<include file="Public:footer" />
